<!--
  @Description:选择楼层布局类型
  @Author: zqy
  @Date: 2020-08-01 13:41:18
  @Last Modified by:   zqy
  @Last Modified time: 2020-08-01 13:41:18
 -->
<template>
  <div class="floor-layout">
    <div v-for="item in layoutList" :key="item.dictCode" class="item" :class="{'product':item.type==='product'}" @click="selectedType(item)">
      <img :src="require('../images/'+item.image)">
      <!-- <div class="t-name">{{ item.dictName }}</div> -->
    </div>
  </div>
</template>

<script>
export default {
  name: 'ActPageFloorLayout',
  props: {
    layoutList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {

    }
  },
  created() {

  },

  methods: {
    selectedType(row) {
      this.$emit('change', row)
    }
  }
}
</script>
<style lang='scss' scoped>
.floor-layout{
  // width: 700px;
  margin: 0 auto;
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  .item{
    width: 25%;
    padding:0 15px;
    margin-bottom:30px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
    &.product{
      width: 33.33%;
    }
    img {
      max-width:100%
    }
  }
  .t-name{
    text-align: center;
    margin-top: 10px;
  }
}
</style>
